package jxtend.processor.eclipse.visitor.interceptor;

import org.eclipse.jdt.internal.compiler.ast.ASTNode;
import org.eclipse.jdt.internal.compiler.ast.MessageSend;
import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration;
import org.eclipse.jdt.internal.compiler.lookup.Scope;

@SuppressWarnings("restriction")
public class FixNullReturnTypeOfProblemMethodBindingInterceptor extends ASTNodeVisitorInterceptorAdapter {

	@Override
	public boolean interceptVisit(ASTNodeVisitorInterceptorContext interceptorChain, ASTNode node, Scope scope) {
		if (node instanceof MessageSend && ((MessageSend) node).binding != null
				&& ((MessageSend) node).binding.returnType == null) {
			MessageSend messageSend = (MessageSend) node;

//			messageSend.binding.returnType = messageSend.returnType.resolveType(methodDeclaration.scope);
		}

		return super.interceptVisit(interceptorChain, node, scope);
	}

}
